package project.movieMap.baseLib.beans;

import com.fasterxml.jackson.annotation.*;
import lombok.*;

@Data
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
@JsonIgnoreProperties(ignoreUnknown = true)
public class Reply {
    //实例化回复必须要被评论的Id,回复内容,来自用户的Id
    @JsonCreator
    public Reply(@JsonProperty("content") String content, @JsonProperty("fromUserId") int fromUserId) {
        this.content = content;
        this.fromUserId = fromUserId;
    }

    //评论的Id
    private int Id;
    //回复内容
    private String content;
    //来自用户Id
    private int fromUserId;
    //对评论的投票
    private int vote;

}
